package com.whitlock.backend.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.whitlock.backend.dao.PermissionDao;
import com.whitlock.backend.entity.TKPermission;
import com.whitlock.backend.service.PermisssionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("permissionService")
public class PermissionServiceImpl extends ServiceImpl<PermissionDao, TKPermission> implements PermisssionService {
    @Autowired
    private PermissionDao permissionDao;

    //删除权限
    @Override
    public void deletePermission(String id){
        permissionDao.deleteById(id);
    }

    //更新权限
    @Override
    public void updatePermission(TKPermission tkPermission){
        permissionDao.updateById(tkPermission);
    }

    //新增权限
    @Override
    public void addPermission(TKPermission tkPermission){
        permissionDao.insert(tkPermission);
    }
}
